package cn.zswltech.gruul.api;

import cn.zswltech.gruul.common.dal.vo.UserVO;
import cn.zswltech.gruul.common.param.UserParam;
import cn.zswltech.gruul.common.result.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Jim
 * @version 1.0.0
 * @descripition:
 * @date 2024/1/29 13:35
 */
// @FeignClient(value = "gruul",path = "/userCenter")
@RequestMapping("userCenter")
public interface UserCenterApi {


    /**
     * 获取用户信息
     *
     * @return
     * @
     */
    @GetMapping("getUserInfo")
    Response<UserVO> getUserInfo();

    /**
     * 用户修改自己的信息
     *
     * @return
     * @
     */
    @PutMapping("updateUser")
    Response updateUser(UserParam userParam);

    /**
     * 用户修改密码
     *
     * @param oldPwd
     * @param newPwd
     * @return
     * @
     */
    @PutMapping("changePwd")
    Response changePwd(@RequestParam(value = "oldPwd") String oldPwd,
                       @RequestParam(value = "newPwd") String newPwd);

    /**
     * 用户修改密码 —— 仅用于登录后强制修改密码，此时不需要输入原密码
     *
     * @param newPwd
     * @return
     * @
     */
    @PutMapping("changePwdAfterLogin")
    Response changePwd(@RequestParam(value = "newPwd") String newPwd);


}
